package com.e3.web.core.server;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 所有应用的rpc servlet必须继承该类。
 * @author Administrator
 *
 */
public class GwtRPCAction {
	
	private HttpServletRequest	perThreadRequest;
	
	private HttpServletResponse	perThreadResponse;
	
	/**
	 * Gets the <code>HttpServletRequest</code> object for the current call. It is stored thread-locally so that simultaneous invocations can have
	 * different request objects.
	 */
	protected final HttpServletRequest getThreadLocalRequest() {
		return perThreadRequest;
	}
	
	/**
	 * Gets the <code>HttpServletResponse</code> object for the current call. It is stored thread-locally so that simultaneous invocations can have
	 * different response objects.
	 */
	protected final HttpServletResponse getThreadLocalResponse() {
		return perThreadResponse;
	}
	
	/**
	 * Gets the <code>HttpServletRequest</code> object for the current call. It is stored thread-locally so that simultaneous invocations can have
	 * different request objects.
	 */
	public final void setThreadLocalRequest(HttpServletRequest perThreadRequest) {
		this.perThreadRequest = perThreadRequest;
	}
	
	/**
	 * Gets the <code>HttpServletResponse</code> object for the current call. It is stored thread-locally so that simultaneous invocations can have
	 * different response objects.
	 */
	public final void setThreadLocalResponse(HttpServletResponse perThreadResponse) {
		this.perThreadResponse = perThreadResponse;
	}

}
